<template>
  <el-dialog class="sr-captcha" title="请完成安全验证" draggable append-to-body width="380px" v-bind="$attrs">
    <SrCaptcha ref="srCaptchaRef" v-bind="$attrs" />
  </el-dialog>
</template>

<script lang="ts" setup name="sr-captcha-dialog">
import { defineAsyncComponent, ref } from 'vue'

const SrCaptcha = defineAsyncComponent(() => import('./index.vue'))

const srCaptchaRef = ref()

//刷新滑块验证码
const refresh = () => {
  srCaptchaRef.value?.refresh()
}

defineExpose({
  refresh,
})
</script>

<style scoped lang="scss"></style>
